package daily;

import java.util.Arrays;

class Solution3131 {

    public static void main(String[] args) {
        Solution3131 solution = new Solution3131();
        long result = solution.addedInteger(solution.case1()[0], solution.case1()[1]);
        System.out.println(result);

        result = solution.addedInteger(solution.case2()[0], solution.case2()[1]);
        System.out.println(result);
    }

    public int addedInteger(int[] nums1, int[] nums2) {
        Arrays.sort(nums1);
        Arrays.sort(nums2);
        return nums2[0] - nums1[0];
    }

    private int[][] case1() {
        return new int[][] {
                {2,6,4},
                {9,7,5}
        };
    }

    private int[][] case2() {
        return new int[][] {
                {10},
                {5}
        };
    }

}
